#ifndef QPENCILTOOL_H
#define QPENCILTOOL_H

#include <QGraphicsItem>
#include <QVector>
#include <QPointF>
#include "qmytool.h"

class TOOLS_EXPORT QPencilTool : public QMyTool
{
	Q_OBJECT

public:
	QPencilTool(QObject *parent = 0);
	~QPencilTool();
    virtual void contextMenuEvent(QGraphicsSceneContextMenuEvent * contextMenuEvent);
    virtual void mouseMoveEvent(QGraphicsSceneMouseEvent * mouseEvent);
    virtual void mousePressEvent(QGraphicsSceneMouseEvent * mouseEvent);
    virtual void mouseReleaseEvent(QGraphicsSceneMouseEvent * mouseEvent);
    virtual void mouseDoubleClickEvent(QGraphicsSceneMouseEvent * mouseEvent );

private:
	bool isDrawing;
	QGraphicsPathItem * temp;
	QPainterPath path;
	QPointF last;
	QVector<QPointF> record;

	
};

#endif // QPENCILTOOL_H
